<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>数据源</title>

		<link rel="stylesheet" href="../../lib/element-ui/index.css">
		<link rel="stylesheet" href="./index.css">

	</head>
	<body notcopyreturnvalue="true">

		<div id="app">
		
			<el-tree :data="treeData" node-key="id" :props="{label: 'name'}" 
		      empty-text="加载日志中... ..." :expand-on-click-node="false" 
		      default-expand-all accordion>
		      <span class="app-filetree-node" slot-scope="{ node, data }">
		        <span><i class="el-icon-folder" v-if="!data.isfile"></i>&nbsp;&nbsp;{{ node.label }}</span>
		        <span>
		          <span v-if="data.isfile">{{ byteFormat(data.length) }}</span>
		          <span>{{ dateFormat(data.last_modified) }}</span>
		        </span>
		        <span>
		          <span v-if="data.isfile && 0 < data.length">
		          	<el-button type="text" size="mini" @click="onVew(data.id)">在线查看</el-button>
		         	<el-button type="text" size="mini" @click="onDownload(data.id)">下载</el-button>
		          </span>
		        </span>
		      </span>
		    </el-tree>
		    
		    <el-dialog title="日志　　　　　(最后 500 行)" :visible.sync="style.logDialogVisible" custom-class="app-log-dialog"> 
		      <span v-html="style.logHtml"></span>
			  <span slot="footer" class="dialog-footer">
			    <el-button type="primary" size="mini" @click="style.logDialogVisible = false">关闭</el-button>
			  </span>
			</el-dialog>
		</div>
	</body>

	<script type="text/javascript" src="../../lib/vue.js"></script>
	<script type="text/javascript" src="../../lib/element-ui/index.js"></script>
	<script type="text/javascript" src="../../lib/snail.common.js"></script>
	<script type="text/javascript" src="./index.js"></script>

</html>
